<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <xxx>
            <h1>你好你好</h1>
        </xxx>
    </div>
    <script src="./js/vue.js"></script>
    <script>
    Vue.component('xxx',{
        data:()=> {
            return {
            }
        },
        template:`<div>
                    <!--  单标签slot相当于占位符，显示自定义标签中的内容  -->
                    <slot/> 
                    <button>添加</button>
                    <!-- 默认展示插槽中的内容 -->
                    <slot></slot>
                </div>`
    })
    const ve = new Vue({
        el:'#app',
        data:{
        }
    })
</script>
</body>
</html>